const {
  $util,
} = getApp();
Page({
  data: {},
  onLoad(options) {
    options.barTitle && wx.setNavigationBarTitle({
      title: decodeURIComponent(options.barTitle),
    })
    $util.request({
      url: `entry/wxapp/edu.incorruptgov.${options.typ}`,
      data: {
        id: options.id,
      },
      success: (res) => {
        this.setData(res);
        // res.list && res.list.title && wx.setNavigationBarTitle({
        //   title: res.list.title,
        // });
      },
    });
  },
  onShareAppMessage() {
    let _this = this;
    let path = '/ws_party_const/pages/education/probity/detail?id=' + _this.data.list.id + '&typ=getcasedetails';
    let res = {
      path,
    };
    return res;
  },
});
